#include "lifter.h"
#include "../CommandBase.h"
//#include "../Commands/IRlocate.h"
#include "../Commands/Joy.h"

Lifter::Lifter() : Subsystem("lifter")
{	
	lifterSpike1 = new Relay(LIFTER1, Relay::kBothDirections);
	lifterSpike2 = new Relay(LIFTER2, Relay::kBothDirections);
}

void Lifter::Forward()
{
	lifterSpike1->Set(Relay::kForward);
	lifterSpike2->Set(Relay::kForward);
}
void Lifter::Stop()
{
	lifterSpike1->Set(Relay::kOff);
	lifterSpike2->Set(Relay::kOff);
}
void Lifter::Reverse()
{
	lifterSpike1->Set(Relay::kReverse);
	lifterSpike2->Set(Relay::kReverse);
}

void Lifter::InitDefaultCommand()
{
	SetDefaultCommand(new LifterJoy()); //impliment IRlocate when have IR sensors in place
//	SetDefaultCommand(new IRlocate()); 
}
